package com.hb.core.pojo.project.notice.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.SectionOptions;
import com.hb.core.pojo.parent.MPCommonEntity;
import com.hb.core.pojo.project.section.dto.BidSectionDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.checkerframework.checker.units.qual.A;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 公告信息表
 * </p>
 *
 * @author zhongdl
 * @since 2021-11-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("trade_notice")
@ApiModel(value="Notice对象", description="公告信息表")
public class Notice extends MPCommonEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "父级id(首次发公告的id)")
    private Long parentId;

    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "公告性质 1.首次公告 2 变更公告 3.延期公告 4 补充 5 终止 6 再次 7 最高限价公告 8 流标公示")
    private Integer noticeNature;

    @ApiModelProperty(value = "公告标题")
    private String noticeTitle;

    @ApiModelProperty(value = "公告内容")
    private String noticeContent;

    @ApiModelProperty(value = "公告媒介")
    private String medium;

    @ApiModelProperty(value = "附件")
    private Attachments attachment;

    @ApiModelProperty(value = "文件出售方式")
    private Integer documentSaleMethod;

    @ApiModelProperty(value = "网上售标")
    private Integer onlineBiddingFlag;


    @ApiModelProperty(value = "采购文件获取地点")
    private String documentObtainPrice;



    @ApiModelProperty(value = "响应文件递交地点")
    private String placeSubmission;

    @ApiModelProperty(value = "开启地点")
    private String openingLocation;

    @ApiModelProperty(value = "递交要求及注意事项")
    private String submissionRequirementPrecautions;

    @ApiModelProperty(value = "邀请方式")
    private Integer invitationMethod;

    @ApiModelProperty(value = "流程审批状态")
    private Integer auditStatus;

    @ApiModelProperty(value = "公告发布状态 1 已发布 2 未发布 3已锁定 4已保存")
    private Integer deployStatus;

    @ApiModelProperty(value = "公告发布时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deployTime;

    @ApiModelProperty(value = "是否推送")
    private Integer pushFlag;

    @ApiModelProperty(value = "企业id")
    private Long orgId;

    @ApiModelProperty(value = "招标文件")
    private Attachments bidFile;

    @ApiModelProperty(value = "公告文件Url")
    private Attachments contentUrl;

    @ApiModelProperty(value = "签过章的公告文件")
    private Attachments signFile;

    @ApiModelProperty(value = "未签章的pdf")
    private Attachments contentPdf;

    /**
     *  该字段除首次公告必填 前端传值
     *  该字段表示是否重新编制招标文件
     * 1: 重新编制招标文件 标段的招标文件信息置位空
     * 2: 不重新编制招标文件
     */
    @ApiModelProperty(value = "是否重新编制招标文件")
    private Integer againFileFlag;


    /**
     * 招标文件中关联标段时设置的标段属性
     * 该属性前端无须传参或设置, 后端会根据DTO中的标段对象进行填充
     */
    @ApiModelProperty(value = "公告中关联标段时设置的标段属性")
    private SectionOptions sectionOptions;

    @ApiModelProperty(value = "阅读量/点击次数")
    private Integer clickCount;
}
